package com.project.lk.nurseapp.nurse.doctorapply;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.project.lk.nurseapp.R;
import com.project.lk.nurseapp.base.BaseActivity;
import com.project.lk.nurseapp.nurse.doctorapply.model.DoctorItemBean;
import com.project.lk.nurseapp.utils.AppManager;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
 * 功能介绍：
 * 项目名：
 * 模块名称：
 * 作者：LK
 * 日期：2018/1/9
 * 修改日期：
 */
public class DoctorMsgActivity extends BaseActivity {

    @BindView(R.id.doctor_title)
    TextView doctorTitle;
    @BindView(R.id.doctor_icon)
    ImageView doctorIcon;
    @BindView(R.id.doctor_name)
    TextView doctorName;
    @BindView(R.id.doctor_nickname)
    TextView doctorNickname;
    @BindView(R.id.doctor_work)
    TextView doctorWork;
    @BindView(R.id.doctor_canplay)
    TextView doctorCanplay;
    @BindView(R.id.doctor_context)
    TextView doctorContext;
    @BindView(R.id.doctor_price)
    TextView doctorPrice;
    private DoctorItemBean doctorItemBean;

    @Override
    protected void initData() {
        doctorItemBean = (DoctorItemBean) getIntent().getSerializableExtra("pay");
    }

    @Override
    protected void initView() {
        String nickname = doctorItemBean.getNickname();
        String consultationFee = doctorItemBean.getConsultationFee();
        String headImg = doctorItemBean.getHeadImg();
        String skilful = doctorItemBean.getSkilful();
        String profiles = doctorItemBean.getProfiles();
        String job = doctorItemBean.getJob();
        Glide.with(this).load(headImg).error(R.drawable.moren)
                .placeholder(R.drawable.moren).into(doctorIcon);
        doctorContext.setText(skilful);
        doctorWork.setText(job);
        doctorName.setText(nickname);
        doctorPrice.setText(consultationFee);
        doctorCanplay.setText(profiles);
//        d.setText(consultationFee);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_doctot_msg;
    }


    @OnClick({R.id.back, R.id.pay_but})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back:
                AppManager.getAppManager().finishActivity();
                break;
            case R.id.pay_but:
                startActivity(new Intent(this,PayDoctorActivity.class)
                        .putExtra("pay",doctorItemBean));
                break;
        }
    }
}
